import axios from 'axios';
import countpProfitRate from "../views/count/countpProfitRate";

axios.interceptors.response.use(function (response) {
    // 对响应数据做点什么
    if(response.data.code === "37" || response.data.code === "35"  || response.data.code === "34" || response.data.code === "38"){
        window.location = "/login";
    }
    return response;
}, function (error) {
    console.log("error:",error);
    debugger
    if( error != "Error: Network Error"){
        // 异常错误不跳转。
        window.location = "/login";
    }else{
        alert("请稍后再试");
        // this.$message({
        //     message: "请稍后再试",
        //     type: 'error'
        // });
    }
    return Promise.reject(error);
});
axios.defaults.timeout =  1000 * 60 * 5 ;

//登录
export const requestLogin = params => {   return axios.post(`/mpayment/user/login`,params).then(res => res.data); };
//查询用户
export const getUserListPage = params => { return axios.post(`/mpayment/user/findUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询平台资金变动记录
export const getPlatFromAccountRecord = params => { return axios.post(`/mpayment/plat/findPlatRecord`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const getProductDiscount = params => { return axios.post(`/mpayment/plat/getProductDiscount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//查询用户登录日志
export const getUserLogPage = params => { return axios.post(`/mpayment/log/searchUserLog`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询省份信息
export const getProvincePage = params => { return axios.post(`/mpayment/province/searchProvince`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询运营商
export const getOperatorListPage = params => { return axios.post(`/mpayment/operator/findPage`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询业务类型
export const getBusTypePage = params => { return axios.post(`/mpayment/businesstype/searchBusinesType`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加业务类型
export const addBussinesType = params => { return axios.post(`/mpayment/businesstype/addBussinesType`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新业务类型
export const updateBussinesType = params => { return axios.post(`/mpayment/businesstype/updateBussinesType`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游充值记录
export const findRechargeRecord = params => { return axios.post(`/mpayment/uprecharge/findRechargeRecord`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游充值记录
export const downFindRechargeRecord = params => { return axios.post(`/mpayment/downrecharge/findRechargeRecord`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加渠道商
export const addUpUser = params => { return axios.post(`/mpayment/user/addUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询上游渠道商
export const findUpUser = params => { return axios.post(`/mpayment/user/findUpUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询省份信息
export const findAllPro = params => { return axios.post(`/mpayment/province/findAllPro`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询单个上游渠道商信息
export const findOneShopInfo = params => { return axios.post(`/mpayment/upshopinfo/findOneShopInfo`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//保存上游渠道商信息
export const updateUpShopInfo = params => { return axios.post(`/mpayment/user/updateUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询上游渠道产品
export const findPageProduct = params => { return axios.post(`/mpayment/upproduct/findPageProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//导出上游产品
export const exportUpProduct = params => { return axios.post(`/mpayment/upproduct/exportUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询上游订单
export const findUpOrder = params => { return axios.post(`/mpayment/uporder/findUpOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findPageProductDown = params => { return axios.post(`/mpayment/upproduct/findPageProductDown`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//上游订单
export const exportdataUpOrder = params => { return axios.post(`/mpayment/uporder/exportdataUpOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询下游充值订单
export const findDownOrder = params => { return axios.post(`/mpayment/downrechargeflow/findDownOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//导出下游订单
export const exportdatampaymentOrder = params => { return axios.post(`/mpayment/downrechargeflow/exportdatampaymentOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游订单批量成功
export const successOrderList = params => { return axios.post(`/mpayment/downrechargeflow/successOrderList`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游充值
export const upRechargeRecord = params => { return axios.post(`/mpayment/uprecharge/upRecharge`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游充值记录导出
export const exportUpRechargeRecord = params => { return axios.post(`/mpayment/uprecharge/exportUpRechargeRecord`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//新增渠道产品 查询运营商 省份 业务类型
export const findOpeProBusShop = params => { return axios.post(`/mpayment/upproduct/findOpeProBusShop`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//根据省份查询上游渠道商
export const findByProvince = params => { return axios.post(`/mpayment/upshopinfo/findByProvince`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加上游产品
export const addUpProduct = params => { return axios.post(`/mpayment/upproduct/addUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量添加上游产品
export const addBatchUpProduct = params => { return axios.post(`/mpayment/upproduct/addBatchUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量添加上游产品
export const findBatchUpProduct = params => { return axios.post(`/mpayment/upproduct/findBatchUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量添加上游产品
export const editBatchUpProduct = params => { return axios.post(`/mpayment/upproduct/editBatchUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量编辑话费上游产品
export const editBatchPhoneUpProduct = params => { return axios.post(`/mpayment/upproduct/editBatchPhoneUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询单个产品信息
export const findOneUpProduct = params => { return axios.post(`/mpayment/upproduct/findOneProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//编辑上游产品信息
export const updateUpProduct = params => { return axios.post(`/mpayment/upproduct/updateUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游订单取消
export const manualCanelOrder = params => { return axios.post(`/mpayment/downrechargeflow/manualCanelOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//手工回调
export const testCanelOrder = params => { return axios.post(`/mpayment/downrechargeflow/testCanelOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//回调
export const statusCallBack = params => { return axios.post(`/mpayment/downrechargeflow/statusCallBack`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const repeatFlowOrder = params => { return axios.post(`/mpayment/downrechargeflow/repeatFlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//退款
export const refundOrder = params => { return axios.post(`/mpayment/downrechargeflow/refundOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//退款
export const refundOrderList = params => { return axios.post(`/mpayment/downrechargeflow/refundOrderList`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//订单失败
export const failtOrder = params => { return axios.post(`/mpayment/downrechargeflow/failtOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//订单失败
export const failtOrderList = params => { return axios.post(`/mpayment/downrechargeflow/failtOrderList`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//订单成功
export const successOrder = params => { return axios.post(`/mpayment/downrechargeflow/successOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游渠道商分页
export const findDownShopPage = params => { return axios.post(`/mpayment/downshopinfo/findDownShopPage`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加下游渠道商
export const addDownShop = params => { return axios.post(`/mpayment/user/addUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询下游渠道商信息
export const findDownShop = params => { return axios.post(`/mpayment/downshopinfo/findOneDownShop`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//编辑下游渠道商信息
export const updateDownShop = params => { return axios.post(`/mpayment/user/updateUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新下游渠道商密匙
export const updateDownShopKey = params => { return axios.post(`/mpayment/downshopinfo/updateDownShopKey`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游充值
export const downRechargeRecord = params => { return axios.post(`/mpayment/downrecharge/downRecharge`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游产品查询分页
export const downProductFind = params => { return axios.post(`/mpayment/downproduct/findPageDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询所有下游产品
export const findAllDownProduct = params => { return axios.post(`/mpayment/downproduct/findAllDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游产品导出
export const exportDownProduct = params => { return axios.post(`/mpayment/downproduct/exportDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//根据省份查询下游渠道商
export const findByDownProvince = params => { return axios.post(`/mpayment/downshopinfo/findByDownProvince`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加下游产品
export const addDownProduct = params => { return axios.post(`/mpayment/downproduct/addDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量产品查询
export const findBatchEditDownProduct = params => { return axios.post(`/mpayment/downproduct/findBatchEditDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量添加产品
export const addDownBatchProduct = params => { return axios.post(`/mpayment/downproduct/addDownBatchProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//复制产品
export const copyDownBatchProduct = params => { return axios.post(`/mpayment/downproduct/copyDownBatchProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量修改产品
export const batchEditDownProduct = params => { return axios.post(`/mpayment/downproduct/batchEditDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const batchEditDownProductAll = params => { return axios.post(`/mpayment/downproduct/batchEditDownProductAll`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询下游单个产品
export const findOneDownProduct = params => { return axios.post(`/mpayment/downproduct/findOneProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新下游产品信息
export const updateDownProduct = params => { return axios.post(`/mpayment/downproduct/updateProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量话费编辑
export const editHandleBatchPhoneEdit = params => { return axios.post(`/mpayment/downproduct/editHandleBatchPhoneEdit`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//修改密码
export const updateUserPassword = params => { return axios.post(`/mpayment/user/updateUserPassword`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询所有供货商
export const findAllUpShopInfo = params => { return axios.post(`/mpayment/upshopinfo/findAllUpShopInfo`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询所有下游渠道商
export const findAllDownShopInfo = params => { return axios.post(`/mpayment/downshopinfo/findAllDownShopInfo`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询测试配置
export const getConfig = params => { return axios.post(`/mpayment/downshopinfo/getConfig`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游产品的启用停用
export const productEnable = params => { return axios.post(`/mpayment/upproduct/productEnable`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游产品的启用停用
export const productDownEnable = params => { return axios.post(`/mpayment/downproduct/productDownEnable`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const autoProduct = params => { return axios.post(`/mpayment/downproduct/autoProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const handleBatchStatus = params => { return axios.post(`/mpayment/upproduct/handleBatchStatus`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const handleBatchClose = params => { return axios.post(`/mpayment/downproduct/handleBatchClose`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//查询所有业务类型
export const findAllBus = params => { return axios.post(`/mpayment/businesstype/findAllBus`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新渠道商开关状态
export const handleEnableShop = params => { return axios.post(`/mpayment/user/handleEnableShop`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//关闭渠道商
export const handleEnableShopIsOpen = params => { return axios.post(`/mpayment/user/handleEnableShopIsOpen`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游产品匹配查询
export const downProductMatchFind = params => { return axios.post(`/mpayment/upproduct/downProductMatchFind`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加下游产品匹配
export const addProductStrategy = params => { return axios.post(`/mpayment/productstrategy/addProductStrategy`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//定时调价
export const batchProductTimer = params => { return axios.post(`/mpayment/productstrategy/batchProductTimer`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游扣款记录查询
export const findPageDebitLog = params => { return axios.post(`/mpayment/debitlog/findPageDebitLog`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游扣款记录
export const findPageDebitUpLog = params => { return axios.post(`/mpayment/debituplog/findPageDebitLog`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游产品编码查询
export const upfindPageCode = params => { return axios.post(`/mpayment/upproductcode/findPageCode`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const upaddProductCode = params => { return axios.post(`/mpayment/upproductcode/addProductCode`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const updateProductCode = params => { return axios.post(`/mpayment/upproductcode/updateProductCode`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const upfindlist = params => { return axios.post(`/mpayment/upproductcode/findList`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };


export const downfindPageCode = params => { return axios.post(`/mpayment/downproductcode/findPageCode`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const downaddProductCode = params => { return axios.post(`/mpayment/downproductcode/addProductCode`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const downupdateProductCode = params => { return axios.post(`/mpayment/downproductcode/updateProductCode`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const downfindlist = params => { return axios.post(`/mpayment/downproductcode/findList`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//count
export const getDownCount = params => { return axios.post(`/mpayment/downrechargeflow/getDownCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const getUpCount = params => { return axios.post(`/mpayment/uporder/getUpCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const countProfit = params => { return axios.post(`/mpayment/profit/countProfit`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const countProfitRate = params => { return axios.post(`/mpayment/profit/countProfitRate`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const countDownProfit = params => { return axios.post(`/mpayment/profit/countDownProfit`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const exportdataDown = params => { return axios.post(`/mpayment/downrechargeflow/exportdataDown`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const exportDataUp = params => { return axios.post(`/mpayment/uporder/exportDataUp`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询产品匹配
export const findByProductFetchInclu = params => { return axios.post(`/mpayment/downproduct/findByProductFetchInclu`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询通道配置分页
export const findPageChannel = params => { return axios.post(`/mpayment/channelbase/findPageChannel`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//通道配置新增
export const addChannel = params => { return axios.post(`/mpayment/channelbase/addChannel`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//通道配置编辑
export const updateChannel = params => { return axios.post(`/mpayment/channelbase/updateChannel`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//根据运营商查询通道
export const findAllChannel = params => { return axios.post(`/mpayment/channelbase/findAllChannel`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游退款记录查询
export const findByChannel = params => { return axios.post(`/mpayment/channelbase/findByChannel`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游退款记录查询
export const getdownFund = params => { return axios.post(`/mpayment/downorderrefund/findPageOrderRefund`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询平台资金
export const findPlatFromAccount = params => { return axios.get(`/mpayment/plat/findPlatFromAccount`,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游订单操作日志
export const findPageUpOrderLog = params => { return axios.post(`/mpayment/upOrderLog/findPageUpOrderLog`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//上游退款记录
export const findPageUpOrderRefund = params => { return axios.post(`/mpayment/upOrderRefund/findPageUpOrderRefund`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询上游产品操作日志
export const findPageUpProductLog = params => { return axios.post(`/mpayment/upproductlog/findPageUpProductLog`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游订单操作日志
export const findDownOrderLog = params => { return axios.post(`/mpayment/downorderlog/findDownOrderLog`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游产品操作日志
export const findDownProductLog = params => { return axios.post(`/mpayment/downproductlog/findDownProductLog`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//新增支出金额
export const addPlatFormAccount = params => { return axios.post(`/mpayment/platformaccouont/addPlatFormAccount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//测试产品
export const testProduct = params => { return axios.post(`/mpayment/downrechargeflow/restTest`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量导入
export const restBatch = params => { return axios.post(`/mpayment/downrechargeflow/restBatch`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//和教育查询学校
export const findPageSchool = params => { return axios.post(`/mpayment/school/findPageSchool`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//所有年级查询
export const findAllGrade = params => { return axios.get(`/mpayment/grade/findAllGrade`,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询所有充值长号
export const findPageMobileAccount = params => { return axios.post(`/mpayment/mpaymentaccount/findPageMobileAccount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询众筹订单
export const findPageGroupMember = params => { return axios.post(`/mpayment/groupmember/findPageGroupMember`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加系统管理员
export const addSystemUser = params => { return axios.post(`/mpayment/user/addSystemUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新系统用户
export const upadteSystemUser = params => { return axios.post(`/mpayment/user/upadteSystemUser`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询下游信息
export const findDownShopInfoKey = params => { return axios.post(`/mpayment/downshopinfo/findDownShopInfoKey`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//电子卷
export const findPageAccount = params => { return axios.post(`/mpayment/electronic/findPageAccount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//电子券账户保存
export const saveAccount = params => { return axios.post(`/mpayment/electronic/saveAccount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新用户信息
export const updateAccount = params => { return axios.post(`/mpayment/electronic/updateAccount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新用户状态
export const updateAccstate = params => { return axios.post(`/mpayment/electronic/updateAccstate`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//电子券分页
export const findPageRecord = params => { return axios.post(`/mpayment/elerecord/findPageRecord`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//电子券失败
export const failtRecord = params => { return axios.post(`/mpayment/elerecord/failtRecord`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//电子券获取验证码
export const getRand = params => { return axios.post(`/mpayment/electronic/getRand`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//短信验证码
export const getMsgRand = params => { return axios.post(`/mpayment/electronic/getMsgRand`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//登录
export const loginEle = params => { return axios.post(`/mpayment/electronic/loginEle`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询余额
//export const getRefreshTop = params => { return axios.post(`/mpayment/electronic/getRefreshTop`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const getRefreshTop = params => { return axios.post(`/mpayment/upshopinfo/getRefreshTop`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//批量失败
export const failtRecords = params => { return axios.post(`/mpayment/elerecord/failtRecords`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//退出
export const logout = params => { return axios.post(`/mpayment/electronic/logout`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//佣金
export const findCommission = params => { return axios.post(`/mpayment/commission/findCommission`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//佣金记录
export const findComRecord = params => { return axios.post(`/mpayment/comrecord/findComRecord`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//提取佣金
export const addCommission = params => { return axios.post(`/mpayment/commission/fetchCommission`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//系统配置查询
export const findPageConfig = params => { return axios.post(`/mpayment/sysconfig/findPageConfig`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//保存
export const saveConfig = params => { return axios.post(`/mpayment/sysconfig/saveConfig`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新
export const updateConfig = params => { return axios.post(`/mpayment/sysconfig/updateConfig`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//任务
export const findPageTask = params => { return axios.post(`/mpayment/task/findPageTask`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询所有省份
export const findAllProvince = params => { return axios.get(`/mpayment/mobile/findAllProvince`,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询省份下的城市
export const findAllCity = params => { return axios.post(`/mpayment/mobile/findAllCity`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//保存任务
export const saveTask = params => { return axios.post(`/mpayment/task/saveTask`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新任务
export const updateTask = params => { return axios.post(`/mpayment/task/updateTask`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新任务状态
export const updateTaskState = params => { return axios.post(`/mpayment/task/updateTaskState`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//成功订单
export const successOrderEle = params => { return axios.post(`/mpayment/elerecord/successOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//批量成功
export const successOrdersEle = params => { return axios.post(`/mpayment/elerecord/successOrders`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//
export const againCommit = params => { return axios.post(`/mpayment/elerecord/againCommit`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//
export const againCommits = params => { return axios.post(`/mpayment/elerecord/againCommits`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//地市查询
export const getMobilePage = params => { return axios.post(`/mpayment/mobile/findPageMobile`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//更新地市
export const updateMobile = params => { return axios.post(`/mpayment/mobile/updateMobile`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//更新状态
export const updateMobileStatus = params => { return axios.post(`/mpayment/mobile/updateMobileStatus`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//流量池
export const findPagePoolConfig = params => { return axios.post(`/mpayment/mpaymentpool/findPagePoolConfig`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加流量池配置
export const addPool = params => { return axios.post(`/mpayment/mpaymentpool/addPool`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//编辑流量池配置
export const updatePool = params => { return axios.post(`/mpayment/mpaymentpool/updatePool`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询指定供货商产品
export const findByUuidProduct = params => { return axios.post(`/mpayment/upproduct/findByUuidProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//流量池产品统计
export const findUpmpaymentCount = params => { return axios.post(`/mpayment/uporder/findUpmpaymentCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//导出
export const exportDataUpmpayment = params => { return axios.post(`/mpayment/uporder/exportDataUpmpayment`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findByUuidDownProduct = params => { return axios.post(`/mpayment/downproduct/findByUuidDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const getDownmpaymentCount = params => { return axios.post(`/mpayment/downrechargeflow/findUpmpaymentCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const exportDataDown = params => { return axios.post(`/mpayment/downrechargeflow/exportDataDown`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//下游充值记录统计
export const downRechargeRecordCount = params => { return axios.post(`/mpayment/downrecharge/downRechargeRecordCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const upRecordCount = params => { return axios.post(`/mpayment/uprecharge/upRecordCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findDownBill = params => { return axios.post(`/mpayment/downshopinfo/findDownBill`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//宽带业务
export const findPageBroadband = params => { return axios.post(`/mpayment/broadband/findPageBroadband`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const importBroadband = params => { return axios.post(`/mpayment/broadband/importBroadband`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateBroadband = params => { return axios.post(`/mpayment/broadband/updateBroadband`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateBroadbands = params => { return axios.post(`/mpayment/broadband/updateBroadbands`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const exportBroadband = params => { return axios.post(`/mpayment/broadband/exportBroadband`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询
export const findAllBroadDownShopInfo = params => { return axios.post(`/mpayment/user/findAllBroadDownShopInfo`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateRefunds = params => { return axios.post(`/mpayment/broadband/updateRefunds`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateNotifiys = params => { return axios.post(`/mpayment/broadband/updateNotifiys`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateStates = params => { return axios.post(`/mpayment/broadband/updateStates`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateInTime = params => { return axios.post(`/mpayment/broadband/updateInTime`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateEndTime = params => { return axios.post(`/mpayment/broadband/updateEndTime`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findBroadShopPage = params => { return axios.post(`/mpayment/downshopinfo/findBroadShopPage`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findOneBroadShop = params => { return axios.post(`/mpayment/downshopinfo/findOneBroadShop`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const deleteBroadband = params => { return axios.post(`/mpayment/broadband/deleteBroadband`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findProvinceCity = params => { return axios.post(`/mpayment/mobile/findProvinceCity`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findPageVirtualOrder = params => { return axios.post(`/mpayment/virtual/findPageVirtualOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findPageCachePhone = params => { return axios.post(`/mpayment/cache/findPageCachePhone`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const getSumPrice = params => { return axios.post(`/mpayment/virtual/getSumPrice`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
// //慢充
// export const findPageSlowList = params => { return axios.post(`/mpayment/slowlist/findPageSlowList`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//
// export const findPageSlowOrder = params => { return axios.post(`/mpayment/sloworder/findPageSlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//
// export const deleteSlowOrder = params => { return axios.post(`/mpayment/sloworder/deleteSlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//
// export const exportSlowOrder = params => { return axios.post(`/mpayment/sloworder/exportSlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findPageSlowProduct = params => { return axios.post(`/mpayment/product/findPageProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateState = params => { return axios.post(`/mpayment/product/updateState`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateProduct = params => { return axios.post(`/mpayment/product/updateProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const addProduct = params => { return axios.post(`/mpayment/product/addProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const addSlowcity = params => { return axios.post(`/mpayment/slowcity/addSlowcity`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateSlowcity = params => { return axios.post(`/mpayment/slowcity/updateSlowcity`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateStateSlow = params => { return axios.post(`/mpayment/slowcity/updateState`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findPageSlowCity = params => { return axios.post(`/mpayment/slowcity/findPageSlowCity`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findPageSlowOrder = params => { return axios.post(`/mpayment/sloworder/findPageSlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//export const deleteWxOrder = params => { return axios.post(`/mpayment/sloworder/deleteSlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const exportSlowOrder = params => { return axios.post(`/mpayment/sloworder/exportSlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

//export const importWxOrder = params => { return axios.post(`/mpayment/sloworder/importSlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const batchCommitOrder = params => { return axios.post(`/mpayment/uporder/batchCommitOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const repeatOrderStatus = params => { return axios.post(`/mpayment/uporder/repeatOrderStatus`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const failtUpOrder = params => { return axios.post(`/mpayment/downrechargeflow/failtUpOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const successUpOrder = params => { return axios.post(`/mpayment/downrechargeflow/successUpOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//查询
export const getBlacklistPage = params => { return axios.post(`/mpayment/blacklist/getBlacklistPage`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//添加
export const updateBlacklist = params => { return axios.post(`/mpayment/blacklist/updateBlacklist`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
//删除
export const deleteBlacklist = params => { return axios.post(`/mpayment/blacklist/deleteBlacklist`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const zeroBalance = params => { return axios.post(`/mpayment/zeroBalance/find`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const getDownFlowCount = params => { return axios.post(`/mpayment/downrechargeflow/findUpFlowCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findUpFlowCount = params => { return axios.post(`/mpayment/uporder/findUpFlowCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
export const exportdataFlowOrder = params => { return axios.post(`/mpayment/downrechargeflow/exportdataFlowOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateArtificial = params => { return axios.post(`/mpayment/upshopinfo/updateArtificial`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const changeQuerySwitch = params => { return axios.post(`/mpayment/upshopinfo/changeQuerySwitch`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const noticeUpSwitch = params => { return axios.post(`/mpayment/upshopinfo/noticeUpSwitch`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const noticeDownSwitch = params => { return axios.post(`/mpayment/downshopinfo/noticeDownSwitch`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updatePressOrder = params => { return axios.post(`/mpayment/upshopinfo/updatePressOrder`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const queryBillDown = params => { return axios.post(`/mpayment/billOrder/queryBillDown`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const queryBillUp = params => { return axios.post(`/mpayment/billOrder/queryBillUp`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const queryStrategyPage = params => { return axios.post(`/mpayment/productstrategy/queryStrategyPage`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateStrategy = params => { return axios.post(`/mpayment/productstrategy/updateStrategy`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const generateBillUp = params => { return axios.post(`/mpayment/billOrder/generateBillUp`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const generateBillDown = params => { return axios.post(`/mpayment/billOrder/generateBillDown`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const queryProductTimerPage = params => { return axios.post(`/mpayment/productTimer/queryProductTimerPage`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const updateProductTimer = params => { return axios.post(`/mpayment/productTimer/updateProductTimer`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const detailProductTimer = params => { return axios.post(`/mpayment/productTimer/detailProductTimer`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const executeProductTimer = params => { return axios.post(`/mpayment/productTimer/executeProductTimer`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const deleteDownProduct = params => { return axios.post(`/mpayment/downproduct/deleteDownProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const deleteUpProduct = params => { return axios.post(`/mpayment/upproduct/deleteUpProduct`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };

export const findDownOrderCount = params => { return axios.post(`/mpayment/downrechargeflow/findDownOrderCount`,params,{headers:{token:JSON.parse(sessionStorage.getItem("user")).token}}).then(res => res.data); };
